feat: probe Sui providers by genesis checkpoint digest - #4070
feat: probe Sui providers by genesis checkpoint digest#4070haiyuechen-nearone wants to merge 9 commits into
Conversation
8141a21 to
052f530
Compare
052f530 to
fa6f569
Compare
5aa7e47 to
5ae8dd8
Compare
Pull request overviewWires Sui into the network-fingerprint probe by implementing The probe path is still library-only ( Changes:
Reviewed changesPer-file summary
FindingsBlocking (must fix before merge):
Non-blocking (nits, follow-ups, suggestions):
|
f2f2d16 to
90a2d58
Compare
|
@claude review |
Pull request overviewThird step of the #4003 probe stack: The blocking documentation inaccuracy from the previous round is fixed: the prose and the code comment now name only
Changes:
Reviewed changesPer-file summary
FindingsNon-blocking (nits, follow-ups, suggestions):
✅ Approved |
f3ae667 to
39b7ec2
Compare
`GetServiceInfo` reports the digest as base58, which is the form it is published and configured in, so nothing is normalized. Completes the probe for every chain that has an inspector.
Serve a fake `LedgerService` over gRPC so the probe tests cover Sui end to end: on its genesis digest, on another network, unreachable, and stalled. The mock HTTP server the other chains use cannot answer a gRPC call. Read the Sui `NotFound` meaning off the response type through `ClassifyRpcOutcome`, as Aptos already does, rather than overriding it at the `network_fingerprint` call site, so a further call site cannot silently inherit `TransactionNotFound`. Derive the attempt deadline once through `timeout_of`, and move the client deadline test beside `prepare_sui`.
Every caller bounds the call itself: `network_fingerprints` arms a deadline before tonic stamps the client's, and the signing flow wraps `extract` in `FOREIGN_CHAIN_INSPECTION_TIMEOUT`. The client's `DeadlineExceeded` never surfaces, so the test pinned a tonic detail no caller observes. A provider that answers `DEADLINE_EXCEEDED` itself does reach the mapping, and `classified__should_name_a_deadline_as_a_timeout` covers that without a server. The fake ledger loses the delay it only needed in order to stall.
The fake ledger now serves whatever answer a test arms, so one server reaches every verdict: on chain, on another network, service info without a chain id, a refused service, and a deadline. Each case enters through `probe_all_providers`, as the other chains' cases do, which also pins the dispatch arm rather than leaving that to the closed port case alone.
A mock that answered every RPC with a plausible status let a test that called the wrong one fail on its assertion instead of on the wrong call. Also drops Ton from the chains said to have no inspector: it has no config section, so it never reaches the probe.
Move the NotFound rationale down to the arm it explains, and drop the comments that restate the code or the fixture they sit on.
3a4ecd9 to
888d013
Compare
Closes #4093.
Notes for review
Nothing is normalized. Base58 is case sensitive and carries no prefix or padding.
NotFoundreads off the response type, through theHasAbsenceMeaningtraits feat: probe Aptos providers by ledger chain id #4069 addedDeadlineExceededmaps toTimeoutinstead ofRpcRequestFailed, so a slow provider reports as timed out rather than unreachable. Both are transient, so retries and the signing path fan out are unchanged.